package com.smedi.ismedi.dangeroussourcemanage.core.domain.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.dangeroussourcemanage.core.domain.aggregatemodel.DangerousSourceLibrary;
import com.smedi.ismedi.dangeroussourcemanage.core.domain.aggregatemodel.QueryDangerousSourceLibraryList;

import java.util.List;
import java.util.Map;

/**
 * 危险源库基础仓库
 *
 * @author xienannan
 * @date 2021/08/23
 */
public interface DangerousSourceLibraryRepository {
    /**
     * 根据id查询危险源库
     *
     * @param queryDangerousSourceLibraryId
     * @return Page<DangerousSourceLibrary>
     */
    DangerousSourceLibrary selectDangerousSourceLibraryById(Long queryDangerousSourceLibraryId);

    /**
     * 根据工程类别查询有哪些危险源库
     *
     * @param engineeringCategory
     * @return List<Long>
     */
    List<Long> selectDangerousSourceLibraryByEngineeringCategory(String engineeringCategory);

    /**
     * 根据工程类别和重点危险源查询有哪些危险源库
     *
     * @param engineeringCategoryAndKeyHazards
     * @return List<Long>
     */
    List<Long> selectDangerousSourceLibraryByEngineeringCategoryAndKeyHazards(String engineeringCategoryAndKeyHazards);

    /**
     * 根据重点危险源查询有哪些危险源库
     *
     * @param keyHazards
     * @return List<Long>
     */
    List<Long> selectDangerousSourceLibraryByKeyHazards(String keyHazards);

    /**
     * 危险源库列表分页查询
     *
     * @param queryDangerousSourceLibraryList
     * @return Page<DangerousSourceLibrary>
     */
    Page<DangerousSourceLibrary> selectDangerousSourceLibraryPageList(QueryDangerousSourceLibraryList queryDangerousSourceLibraryList);

    /**
     * 危险源库列表查询
     *
     * @param queryDangerousSourceLibraryList
     * @return List<DangerousSourceLibrary>
     */
    List<DangerousSourceLibrary> selectDangerousSourceLibraryList(QueryDangerousSourceLibraryList queryDangerousSourceLibraryList);

    Map<Long, String> getIdNameMap(List<Long> hazardIdList);
}
